#ifndef __USR_I2C_H
#define __USR_I2C_H

/* Includes ------------------------------------------------------------------*/
#include "apm32f00x.h"
#include "stdio.h"
#include <string.h>

void I2C_Init(void);
int i2c_r_reg(uint8_t dev_adr, uint8_t addr, uint8_t *buf, uint16_t len);
int i2c_w_reg(uint8_t dev_adr, uint8_t addr, uint8_t data);
int i2c_w_regs(uint8_t dev_adr, uint8_t *data, uint16_t len);

#endif
